package huawei;

import java.util.Map;

/**
 * 通过软盘拷贝文件
 */
public class Q90 {

    public static void main(String[] args) {
        int[] files = {737270, 737272, 737288};

        int bagNum = files.length; // 背包数量
        int totalKuai = 1474560 / 512; // 块的数量

        int[][] dp = new int[bagNum + 1][totalKuai + 1];

        for (int i = 1; i < dp.length; i++) {
            int w = (files[i - 1] + 511) / 512;
            int v = files[i - 1];
            for (int j = 0; j < dp[i].length; j++) {
                dp[i][j] = dp[i - 1][j];
                if (j >= w ) {
                    dp[i][j] = Math.max(dp[i - 1][j], dp[i - 1][j - w] + v);
                }
            }
        }

        System.out.println(dp[bagNum][totalKuai]);
    }
}
